package cn.ly.security.dao;

import cn.ly.security.entity.Info;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
@Repository
@Mapper
public interface InfoMapper extends BaseMapper<Info> {
    @Select("select * from info inner join equipment on info.device_id=equipment.id where")
    List<Map<String, Object>> lyGetInfoList(Page<Map<String, Object>> page);
        List<Info> selectAllDevice(@Param("current") Integer current, @Param("size") Integer size);
        List<Info> selectDeviceByName(@Param("iName") String iName,@Param("current")Integer current,@Param("size")Integer size);
        List<Info> selectAllByArea();
        List<Info> selectAreaByName(@Param("iArea")String iArea);
    Info selectSingleDeviceByName(@Param("iName")String iName);
}